package org.s3.project.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.s3.project.entity.Payments;
import org.s3.project.mapper.PaymentsMapper;
import org.s3.project.service.PaymentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author cfx
 * @version 1.0
 * @Description
 * @date 2025/2/9 10:26
 */
@Service
public class PaymentsServiceImpl extends ServiceImpl<PaymentsMapper, Payments> implements PaymentsService {
    @Autowired
    private  PaymentsMapper paymentsMapper;
    @Override
    public double getTotalAmount() {
        Double totalAmount = paymentsMapper.getTotalAmount();
        return totalAmount != null ? totalAmount : 0;
    }
}
